import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/enrollments',
    method: 'get',
    params: query
  })
}

export function updateEnrollment(id, action) {
  return request({
    url: '/api/enrollments/' + id,
    method: 'post',
    data: {
      action: action
    }
  })
}
